package com.lichhao.common.converter;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.core.convert.converter.Converter;

public class CommonDateReadConverter implements Converter<Date, Date>{

	public Date convert(final Date source) {
		
		final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
		
		return new Date(source.getTime()){
			public String toString() {
				return format.format(source);
			}
		};
		
	}
}
